home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / keymakr.exe / lha / TESTAD.PAS < prev    next >
Pascal/Delphi Source File  |  1990-10-02  |  2KB  |  86 lines

  1. program  testad;
  2. uses AddrKey, crt, readttt5, fastttt5, iottt5;
  3. { If you do not have the TTT toolbox remove readttt5, fasttt5, iottt5
  4.   from the USES statement.}
  5. var
  6.    addr : AddrType;
  7.    key  : String;
  8.    ans  : Boolean;
  9. begin
  10. {$V-}
  11.    addr.addr1:='';
  12.    addr.addr2:='';
  13.    addr.city:='';
  14.    addr.state:='';
  15.    addr.zip:='';
  16.  
  17.    Clrscr;
  18.                                   { NON-TTT - remove from here to }
  19.    Create_Fields(5);
  20.    Set_Default_Rules(AllowNull+JumpIfFull);
  21.  
  22.    Add_Field(1,5,2,5,2,20,5);
  23.    Add_Field(2,1,3,1,3,20,6);
  24.    Add_Field(3,2,4,2,4,20,7);
  25.    Add_Field(4,3,5,3,5,41,7);
  26.    Add_Field(5,4,1,4,1,50,7);
  27.  
  28.    String_Field(1,Addr.Addr1,'***************************************');
  29.    String_Field(2,Addr.Addr2,'***************************************');
  30.    String_Field(3,Addr.city,'***************');
  31.    String_Field(4,Addr.State,'**');
  32.    String_Field(5,Addr.Zip,'#####');
  33.                                   {here}
  34.  
  35.    Repeat
  36.    Clrscr;
  37.  
  38.                                   {non-ttt - remove from here to...}
  39.    WriteAt(11,5,White,Black,'Address:');
  40.    WriteAt(14,7,White,Black,'City:');
  41.    WriteAt(37,7,White,Black,'St:');
  42.    WriteAt(45,7,White,Black,'Zip:');
  43.  
  44.    Display_All_Fields;
  45.    Process_Input(1);
  46.                                   {here}
  47.  
  48.                                   {non-ttt replace previous code with
  49.    GotoXY(11,5); Write('address:');
  50.    GotoXY(14,7); write('City:');
  51.    GotoXY(37,7); Write('St:');
  52.    GotoXY(45,7); Write('Zip:');
  53.  
  54.    GotoXY(20,5); readln(addr.addr1);
  55.    GotoXY(20,6); readln(addr.addr2);
  56.    GotoXY(20,7); readln(addr.City);
  57.    GotoXY(41,7); readln(addr.St);
  58.    GotoXY(50,7); readln(addr.Zip);
  59.                                    this}
  60.  
  61.  
  62.    key := AddrToKeyT(addr);
  63.  
  64.    GotoXY(12,13);   Writeln('zipcode - ',AKKey.ZIP);
  65.    GotoXY(12,14);   Writeln('Street  - ',akkey.street);
  66.    GotoXY(12,15);   Writeln('Street# - ',akkey.StNum);
  67.    GotoXY(12,16);   Writeln('Apt     - ',akkey.Apt);
  68.  
  69.                                   {NON-TTT - remove from here }
  70.    Read_YN(25,22,'Again? ',1,ans)
  71.                                   {to here}
  72.  
  73.                                   {non-ttt replace previous code with
  74.    while(ans <> 'Y' or ans <> 'N') do
  75.    begin
  76.       ans := 'Y'
  77.       GotoXY(25,22) Write('Again? Y');
  78.       GotoXY(25,29) Readln(ans);
  79.       UpCase(ans);
  80.    end;
  81.                                   this}
  82.  
  83.    Until(not ans);
  84.    Clrscr;
  85. end.
  86.